//
//  SecondViewController.m
//  UI08_Homework
//
//  Created by dllo on 16/5/12.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "SecondViewController.h"

@interface SecondViewController ()

@property (nonatomic, retain) UITextField *faild;


@end

@implementation SecondViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self creatSecond];
    self.view.backgroundColor = [UIColor yellowColor];
    
    
    
    
    
}

- (void)creatSecond{
    self.faild = [[UITextField alloc] initWithFrame:CGRectMake(40, 100, 300, 50)];
    
    self.faild.backgroundColor = [UIColor orangeColor];
    [self.view addSubview:self.faild];
    [_faild release];
    self.faild.borderStyle = 3;
    self.faild.text = self.secondText;
    
   
    self.faild.alpha = 0.6;
     
    
    
    UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(100, 200, 100, 100)];
    button.backgroundColor = [UIColor greenColor];
    [self.view addSubview:button];
    
    [button setTitle:@"One" forState:UIControlStateNormal];
    
    [button addTarget:self action:@selector(handleOne) forControlEvents:UIControlEventTouchUpInside];
    
 
}

- (void)handleOne{
    
    [self.secondDelegate changeValue:self.faild.text];
    
    
    [self.navigationController popViewControllerAnimated:YES];
    

    




}








@end
